package com.wyz.saas.module.chat.bean.repository

import androidx.annotation.WorkerThread
import com.wyz.saas.module.chat.bean.User
import com.wyz.saas.module.chat.bean.dao.UserDao
import kotlinx.coroutines.flow.Flow

class UserRepository(private val userDao: UserDao) {

    val allWords: Flow<List<User>> = userDao.getAlphabetizedWordsByFlow()

    @Suppress("RedundantSuspendModifier")
    @WorkerThread
    suspend fun insert(user: User) {
        userDao.insert(user)
    }
}